<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <meta http-equiv="Cache-Control" content="no-siteapp">
  <link rel="stylesheet" type="text/css" href="/static/index/css/reset.css">
  <link rel="stylesheet" type="text/css" href="/static/index/css/newProject.css">
  <title></title>
</head>
<body>
  <div class="new_project">
    <div class="new_title">
      当前位置：快捷方式/新建项目
    </div>
    <div class="project_first">
      <div class="step">
        <li class="con_step y_step">
          基础设置
          <p>第一步</p>
        </li>
        <li class="img_show"></li>
        <li class="con_step el_step">
          扫描设置
          <p>第二步</p>
        </li>
        <li class="img_hide"></li>
        <li class="con_step el_step">
          时间设置
          <p>第三步</p>
        </li>
      </div>
      <div class="detail_step">
      <form id="one_form" method="post" action="{:url('scanSetting')}" enctype="multipart/form-data">
      <!-- 基础设置 -->
        <div class="basics">
          <div class="de_title">
            基础设置
          </div>
          <div style="margin-top:30px">
            项目名称：
            <input type="text" class="basics_name" name="name" />
          </div>
          <div>
            团队选择：
            <div class="select_box" id="select_team">
              <div class="select_content" id="team_con">
              </div>
              <input type="hidden" name="group_id">
              <ul class="select_li" id="team_li">
                 <li>1</li>
                 <li>5</li>
                 <li>8</li>
                 <li>7</li>
                 <li>4</li> 
              </ul>
              </div>
          </div>
        </div>

        <!-- 源码设置 -->
        <div class="basics" style="height:330px;">
          <div class="de_title">
            源码设置
          </div>
            <div style="margin-top:30px">
              <div>
                <input type="radio" name="type" value="1" checked>本地上传：
                <input type="text" class="basics_name" id="web_upload"/>
                <span style="position:relative">
                  <span class="select_btn">选择</span>
                  <input type="file" name="fileUpload" multiple="multiple" accept="application/zip" class="upload" id="upload" />
                </span>
                
              </div>
              <div style="margin-top:30px">
                <span style="margin-right:345px;">
                  <input type="radio" name="type" value="2">远端抓取：
                </span>
                <span class="classes" style="margin:0;">
                  类型
                  <div class="select_box" id="select_type">
                    <div class="select_content" id="type_con">
                    </div>
                    <input type="hidden" name="source">
                      <ul class="select_li" id="type_li">
                         <li>TFS</li>
                         <li>SVN</li>
                         <li>GIT</li>
                         <li>Perforce</li>                       
                      </ul>
                    </div>

                </span>
                <span class="classes">
                  路径 
                  <input type="text" class="basics_name" name="route"/>
                  <span class="select_btn" id="proof">凭证 </span>
                  <input type="hidden" name="proof_user">
                  <input type="hidden" name="proof_pwd">
                </span>
                <span class="classes">
                  分支 
                  <input type="text" class="basics_name" name="branch"/>
                  <span class="select_btn">选择</span>
                </span>
              </div>
           </div> 
      </div>

      <!-- 地址设置 -->
      <div class="basics">
          <div class="de_title">
            地址设置
          </div>
          <div style="margin-top:30px">
            登录地址：
            <input type="text" class="basics_name" name="login_url"/>
          </div>
          <div style="margin-top:30px">
            测试用户：
            <input type="text" class="basics_name" name="username"/>
          </div>
          <div style="margin-top:30px">
            测试密码：
            <input type="text" class="basics_name" name="password"/>
          </div>
      </div> 
      </form>     
    </div>
    <div class="select_way">
      <a href="javascript:;">
          <button type="submit" class="next">下一步</button>
      </a>
      <button class="cancel" style="margin-left:21%">取消</button>
      </div>
  </div>

  <!--  凭证弹出框-->

  <!-- 选择邮件发送地址 -->
  <div class="list_content">
    <div class="list_hint" id="el_scan">
      <span class="can_hint">凭证弹出框</span>
      <div id="scroll_table">
        <table class="table">
        <tr class="con_tittle">
          <th>
          </th>   
          <th>
             <span>地址</span>
          </th>
          <th>  
             <span>账号</span>
          </th>
          <th>
             <span>密码</span>
          </th>
          <th>
             <span>操作</span>
          </th>
        </tr>
        <!-- 账号 -->
        <tr class="con_list" id="con_account">
          <td>
            <input type="checkbox">
          </td>
          <td>http://localhost</td>
          <td>root</td>
          <td>******</td>
          <td>
            <img src="/static/index/images/wri.png" class="wri"/>
            <img src="/static/index/images/del.png" class="del"/>
          </td>
        </tr>
        <!-- 密钥 -->
        <tr class="con_list" id="con_key">
          <td>
            <input type="checkbox">
          </td>
          <td>http://localhost</td>
          <td>密钥</td>
          <td>密钥</td>
          <td>
            <img src="/static/index/images/wri.png" class="wri"/>
            <img src="/static/index/images/del.png" class="del"/>
          </td>
        </tr>
        </table>
      </div>
      
      <div class="number">
      <!-- 用户 -->
        <span>
          <input name="checkbox" type="checkbox" value="checkbox" class="zhanghao"/>账号
          用户<input type="text"  class="basics_name" name="proof_user2" />
        </span>
        <span>
          密码<input type="text" class="basics_name" name="proof_pwd2"/>
        </span>
        <!-- 密钥 -->
        <span class="ssl">
          <input name="checkbox" type="checkbox" value="checkbox" class="check_ssl"/>SSL
          <!-- 密钥输入与选择 -->
          <span class="hide_key">
              密钥<input type="text"  class="basics_name"/>
              <span class="select_btn" style="display:inline-block">选择 </span>
          </span>
        </span>
        <!-- 密钥文件选择后内容显示区 -->
        <div class="miyao"></div>
      </div>
      <div class="hint_select">
        <span class="hint_delete">取消
        </span>
        <span class="hint_ensure" id="begin_scan">确认
        </span>
      </div>
    </div>

    
    <!-- 凭证信息修改弹框 -->
    <div class="alter">
      <!-- 密钥修改 -->
      <div class="alter_key">
        <span>
          密钥
          <input type="text" class="alert_inp"/>
          <span class="select_btn">选择</span>
        </span>
        <div class="key_con"></div>
      </div>
      <!-- 用户修改 -->
      <div class="alter_mima">
        <span>
          用户：
          <input type="text" class="alert_inp"/>
        </span>
        <span>
          密码：
          <input type="text" class="alert_inp"/>
        </span>
      </div>
      
      <div class="hint_select" id="alter_select">
        <span class="hint_delete">取消
        </span>
        <span class="hint_ensure" id="begin_scan">确认
        </span>
      </div>
    </div>
</body>
<script type="text/javascript" src="/static/index/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/static/index/js/newProject.js"></script>
<script type="text/javascript">
  var str_temp=[];
  $(".upload").change(function(){
    change()
  })  
  function change(){   
      var obj = document.getElementById("upload");   
      var length = obj.files[0].length;
      //这里应该是文件数组，而不是文件整个数组名称   
      for(var i=0;i<obj.files.length;i++){  
        console.log(obj.files[i]);      
         var temp = obj.files[i].name;         
         str_temp[i]=temp;   
      }
      if($("#web_upload").val()!==""){
        $("#web_upload").val($("#web_upload").val()+str_temp);
      }else{
        $("#web_upload").val(str_temp);
      }  
 }
</script>
</html>